<template>
  <div id="discount" :style="{
        marginTop:styles.marginTop+'px',
       marginBottom:styles.marginBottom+'px',
        marginLeft:styles.marginLR+'px',
         marginRight:styles.marginLR+'px'
        }">
      <ul class="discount-list">
          <li class="discount-list-detail">
              <div>
                  <div>
                      <span>￥</span>
                      <span>5</span>
                  </div>
                  <div>
                      <p>满105可用</p>
                      <p>全品类可用(特殊商品除外)</p>
                  </div>
              </div>
              <div>
                  <div><span></span></div>
                  <p>今日限量1万张</p>
                  <div>立即领取</div>
              </div>
          </li>
      </ul>
  </div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
export default {
  name: "discount",
  data() {
    return {};
  },
  props: ["styles"],
};
</script>
<style lang='less' scoped>
#discount{
    background-color: #F7C54C;
    padding: 10px;
    .discount-list{
        .discount-list-detail:last-child{
            margin-bottom: 0;
        }
        .discount-list-detail{
            display: flex;
            background-color: #fff;
            border: 1px solid #eee;
            border-radius: 10px;
            margin-bottom: 10px;
            >div{
                padding: 10px 0;
            }
            >div:nth-of-type(1){
                width: 60%;
                display: flex;
                justify-content: space-around;
                align-items: center;
                >div:nth-of-type(1){
                    display: flex;
                    justify-content: center;
                    width: 20%;
                    >span{
                        color: #C99F22;
                    }
                    >span:nth-of-type(1){
                        font-size: 18px;
                    }
                    >span:nth-of-type(2){
                        font-size: 24px;
                    }
                }
                >div:nth-of-type(2){
                    width:80%;
                    padding:0 10px;
                    >p:nth-of-type(1){
                        display: inline;
                        font-size: 12px;
                        color: #C99F22;
                        background-color: #FCF1F9;
                        padding: 0 10px;
                    }
                    >p:nth-of-type(2){
                        margin-top: 4px;
                        font-size: 12px;
                    }
                }
            }
            >div:nth-of-type(2){
                width: 40%;
                padding-left: 10px;
                background: url('../../../assets/img/dis2.png') no-repeat;
                text-align: center;
                >div:nth-of-type(1){
                    width: 80%;
                    height: 10px;
                    background-color: #D8AC2D;
                    margin: 0 auto 5px;
                    border-radius: 10px;
                    position: relative;
                    >span{
                        position: absolute;
                        left: 0;
                        top: 0;
                        display: inline-block;
                        width: 40%;
                        height: 10px;
                        background-color: #fff;
                        border-radius: 10px;
                    }
                }
                >p:nth-of-type(1){
                    font-size: 12px;
                    color: #9B780C;
                }
                >div:nth-of-type(2){
                    padding:5px 10px;
                    background-color: #2B3142;
                    width: 60%;
                    margin: 15px auto 0;
                    font-size: 10px;
                    color: #fff;
                    border-radius: 30px;
                }
            }
        }
    }
}
</style>